package My4;

import javax.swing.*;
import java.text.*;
public class My4 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        System.out.println("It is program My4");
        String name=JOptionPane.showInputDialog("What is year NAME?");
        System.out.println("Hello "+name);
        String i1=JOptionPane.showInputDialog("First number?");
        String i2=JOptionPane.showInputDialog("Second number?");
        int ni1=Integer.parseInt(i1);
        int ni2=Integer.parseInt(i2);
        System.out.println(i1+"x"+i2+"="+ni1*ni2);
        System.out.println(i1+"/"+i2+"="+ni1/ni2);
        NumberFormat myformat=NumberFormat.getNumberInstance();
        myformat.setMaximumFractionDigits(3);
        System.out.println(i1+"x"+i2+"="+myformat.format (ni1*ni2));
        System.out.println(i1+"/"+i2+"="+myformat.format((double) ni1/ni2));
        System.exit(0);
    }

}
